package com.hsmw.api.service;


import com.hsmw.api.mapper.HsmwDriverClassMapper;
import com.hsmw.api.mapper.HsmwDriverOrderRecordMapper;
import com.hsmw.common.base.BaseService;
import com.hsmw.domain.HsmwDriverClass;
import com.hsmw.domain.HsmwDriverOrderRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class HsmwDriverOrderRecordService extends BaseService<HsmwDriverOrderRecordMapper, HsmwDriverOrderRecord> {


    @Autowired
    private HsmwDriverOrderRecordMapper hsmwDriverOrderRecordMapper;


    public List<HsmwDriverOrderRecord> findDriverCountAndDriverId(String params) {


        return hsmwDriverOrderRecordMapper.findDriverCountAndDriverId(params);
    }

    public int queryOrderCount(String ownCompanyId) {

        return hsmwDriverOrderRecordMapper.queryOrderCountByCompanyId(ownCompanyId);
    }

    public Double queryRealVolumeByCompanyId(String ownCompanyId) {

        return hsmwDriverOrderRecordMapper.queryRealVolumeByCompanyId(ownCompanyId);
    }
}
